package com.glela.platform.model;

import java.util.ArrayList;
import java.util.List;

import org.apache.cxf.common.util.StringUtils;

/**
 * @author MaoZeYao 用户表
 */
public class User {

	private Long id;

	private String userName="";// 登陆用户名//手机号码

	private String password="";// 登录密码

	private int roleId;// 角色

	private int empiricValue;// 角色经验值

	private int totalCost;// 累计消费金额

	private String recommendFrom="";// 推荐人身份id

	private String nickName="";// 昵称

	private String picture="";// 头像

	private int lockStatus;// 1锁定 0未锁定

	private int isBlack;// 是否黑名单(1：是 0：否)

	private int isStore;// 店铺权限（0非，1店员，2店长）

	private int storeId;// 店铺id

	private int money;// 账号余额

	private String synopsis="";// 个人介绍

	private String talentEffectTime="";// 达人生效时间

	private String talentFailureTime="";// 达人失效时间

	private String lastLoginTime="";// 最后登陆时间

	private String createTime="";// 创建时间

	private String updateTime="";// 修改时间

	private UserInfo userInfo;

	private String memberRecommend="";// 会员推荐人

	private String talentTeacher="";// 达人导师/经纪人身份id

	private int totalSale;// 用户累计销售额度

	private int UpgradeExperience;// 升级剩余经验值

	private int fansCount;// 粉丝数

	private long remainSalesQuota;// 升级所需剩余销售额度

	private String backgroundImage="";// 达人主页背景图

	private int userType;

	private String rongCloudToken="";

	private String token="";

	private String openId="";// 第三方id （通过code获取的信息中的openId）
	
	private int isOpenRecommand;//是否打开推荐
	
	private String persionId;

	private int bindRecommendMode;

	private String lastBindTime;

	private String userMachineCode;
	
	private List<PromotionDetail> promotionDetailList;// 优惠券信息
	
	private boolean isFirstBindPhone = false;

	public String getLastBindTime() {
		return lastBindTime;
	}

	public void setLastBindTime(String lastBindTime) {
		this.lastBindTime = lastBindTime;
	}

	public String getUserMachineCode() {
		return userMachineCode;
	}

	public void setUserMachineCode(String userMachineCode) {
		this.userMachineCode = userMachineCode;
	}

	public int getBindRecommendMode() {
		return bindRecommendMode;
	}

	public void setBindRecommendMode(int bindRecommendMode) {
		this.bindRecommendMode = bindRecommendMode;
	}

	public String getBackgroundImage() {
		return backgroundImage;
	}

	public void setBackgroundImage(String backgroundImage) {
		this.backgroundImage = backgroundImage;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getRoleId() {
		return roleId;
	}

	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}

	public int getEmpiricValue() {
		return empiricValue;
	}

	public void setEmpiricValue(int empiricValue) {
		this.empiricValue = empiricValue;
	}

	public int getTotalCost() {
		return totalCost;
	}

	public void setTotalCost(int totalCost) {
		this.totalCost = totalCost;
	}

	public int getLockStatus() {
		return lockStatus;
	}

	public void setLockStatus(int lockStatus) {
		this.lockStatus = lockStatus;
	}

	public int getIsBlack() {
		return isBlack;
	}

	public void setIsBlack(int isBlack) {
		this.isBlack = isBlack;
	}

	public int getIsStore() {
		return isStore;
	}

	public void setIsStore(int isStore) {
		this.isStore = isStore;
	}

	public int getStoreId() {
		return storeId;
	}

	public void setStoreId(int storeId) {
		this.storeId = storeId;
	}

	public int getMoney() {
		return money;
	}

	public void setMoney(int money) {
		this.money = money;
	}

	public String getSynopsis() {
		return synopsis;
	}

	public void setSynopsis(String synopsis) {
		if (StringUtils.isEmpty(synopsis)) {
			this.synopsis = "";
		}
		this.synopsis = synopsis;
	}

	public String getTalentEffectTime() {
		return talentEffectTime;
	}

	public void setTalentEffectTime(String talentEffectTime) {
		this.talentEffectTime = talentEffectTime;
	}

	public String getTalentFailureTime() {
		return talentFailureTime;
	}

	public void setTalentFailureTime(String talentFailureTime) {
		this.talentFailureTime = talentFailureTime;
	}

	public String getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(String lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	public UserInfo getUserInfo() {
		return userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getPicture() {
		return picture;
	}

	public void setPicture(String picture) {
		this.picture = picture;
	}

	public String getRecommendFrom() {
		return recommendFrom;
	}

	public void setRecommendFrom(String recommendFrom) {
		this.recommendFrom = recommendFrom;
	}

	public String getMemberRecommend() {
		return memberRecommend;
	}

	public void setMemberRecommend(String memberRecommend) {
		this.memberRecommend = memberRecommend;
	}

	public String getTalentTeacher() {
		return talentTeacher;
	}

	public void setTalentTeacher(String talentTeacher) {
		this.talentTeacher = talentTeacher;
	}

	public int getTotalSale() {
		return totalSale;
	}

	public void setTotalSale(int totalSale) {
		this.totalSale = totalSale;
	}

	public int getUpgradeExperience() {
		return UpgradeExperience;
	}

	public void setUpgradeExperience(int upgradeExperience) {
		UpgradeExperience = upgradeExperience;
	}

	public int getFansCount() {
		return fansCount;
	}

	public void setFansCount(int fansCount) {
		this.fansCount = fansCount;
	}

	public long getRemainSalesQuota() {
		return remainSalesQuota;
	}

	public void setRemainSalesQuota(long remainSalesQuota) {
		this.remainSalesQuota = remainSalesQuota;
	}

	public int getUserType() {
		return userType;
	}

	public void setUserType(int userType) {
		this.userType = userType;
	}

	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

	public String getRongCloudToken() {
		return rongCloudToken;
	}

	public void setRongCloudToken(String rongCloudToken) {
		this.rongCloudToken = rongCloudToken;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public int getIsOpenRecommand() {
		return isOpenRecommand;
	}

	public void setIsOpenRecommand(int isOpenRecommand) {
		this.isOpenRecommand = isOpenRecommand;
	}

	public String getPersionId() {
		return persionId;
	}

	public void setPersionId(String persionId) {
		this.persionId = persionId;
	}
	
	public List<PromotionDetail> getPromotionDetailList() {
		return promotionDetailList;
	}

	public void setPromotionDetailList(List<PromotionDetail> promotionDetailList) {
		if (promotionDetailList == null || promotionDetailList.size() == 0) {
			this.promotionDetailList = new ArrayList<PromotionDetail>();
		} else {
			this.promotionDetailList = promotionDetailList;
		}
	}

	public boolean isFirstBindPhone() {
		return isFirstBindPhone;
	}

	public void setFirstBindPhone(boolean isFirstBindPhone) {
		this.isFirstBindPhone = isFirstBindPhone;
	}

}
